// 申请医院授权状态
export const searchParamsR = {
  '-1': '',
  '2': '待审核',
  '3': '已通过',
  '4': '已停用',
  '5': '已拒绝'
}

export const searchParamsC = {
  '-1': '',
  '1': '待审核',
  '2': '已通过',
  '3': '已拒绝',
  '0': '已停用'
}

// 申请医院授权-表头
export const attrColumns = [{
  width: '60',
  prop: 'num',
  label: '序号'
},
{
  width: '100',
  prop: 'action',
  label: '操作',
  fixed: 'right'
},

{
  'min-width': '150',
  prop: 'supplierName',
  label: '配送商名称',
  'show-overflow-tooltip': true
},
{
  width: '110',
  prop: 'contactName',
  label: '联系人'
},
{
  width: '120',
  prop: 'contactNumber',
  label: '联系方式',
  'show-overflow-tooltip': true
}, {
  width: '120',
  prop: 'contractCode',
  label: '合同编号',
  'show-overflow-tooltip': true
},
{
  width: '110',
  prop: 'validityFrom',
  label: '合同开始时间'
},
{
  width: '100',
  prop: 'validityTo',
  label: '截止时间'
},
{
  width: '100',
  prop: 'contract',
  label: '配送合同'
},
{
  width: '100',
  prop: 'product',
  label: '授权产品'
},
{
  width: '85',
  prop: 'checkDetails',
  label: '审核历史'
},
{
  width: '70',
  prop: 'authState',
  label: '状态',
  formatter: row => {
    if (!row.authState && row.authState !== 0) {
      return searchParamsR['-1']
    } else {
      return searchParamsR[row.authState]
    }
  }
},
{
  width: '120',
  prop: 'remark',
  label: '备注',
  'show-overflow-tooltip': true
}
]
// 审核历史-表头
export const attrColumns1 = [{
  width: '60',
  prop: 'num',
  label: '序号'
},
{
  'min-width': '150',
  prop: 'role',
  label: '角色名称',
  'show-overflow-tooltip': true
},
{
  width: '120',
  prop: 'user',
  label: '用户',
  'show-overflow-tooltip': true
},
{
  width: '120',
  prop: 'opeartion',
  label: '操作 ',
  'show-overflow-tooltip': true
},
{
  width: '170',
  prop: 'operateTime',
  label: '日期'
},
{
  width: '120',
  prop: 'remark',
  label: '备注',
  'show-overflow-tooltip': true
}
]
export const searchParams = [
//   {
//   label: '全部状态',
//   value: -1
// },
  {
    label: '待审核',
    value: 1
  },
  {
    label: '已通过',
    value: 2
  },
  {
    label: '已拒绝',
    value: 3
  }, {
    label: '已停用',
    value: 0
  }
]

// 授权产品-表头
export const productColumns = [
  {
    type: 'selection',
    width: '50'
  }, {
    width: '60',
    prop: 'num',
    label: '序号'
  },
  {
    width: '100',
    prop: 'action',
    label: '操作',
    fixed: 'right'
  },

  // {
  //   'min-width': '100',
  //   prop: 'department',
  //   label: '科室',
  //   'show-overflow-tooltip': true
  // },
  {
    'min-width': '150',
    prop: 'chName',
    label: '产品名称',
    'show-overflow-tooltip': true
  },
  {
    width: '120',
    prop: 'platCode',
    label: '平台编码',
    'show-overflow-tooltip': true
  }, {
    width: '120',
    prop: 'hosProdCode',
    label: '院内码',
    'show-overflow-tooltip': true
  },
  {
    'min-width': '110',
    prop: 'spec',
    label: '规格',
    'show-overflow-tooltip': true
  },
  {
    'min-width': '100',
    prop: 'model',
    label: '型号'
  },
  {
    width: '90',
    prop: 'unit',
    label: '单位',
    'show-overflow-tooltip': true
  },
  {
    width: '120',
    prop: 'price',
    label: '单价（元）',
    'show-overflow-tooltip': true,
    formatter: row => {
      return Number(row.price).toFixed(2) || '--'
    }
  },
  {
    width: '100',
    prop: 'registNo',
    label: '注册证号',
    'show-overflow-tooltip': true
  },
  {
    'min-width': '200',
    prop: 'manufacturerName',
    label: '生产厂家',
    'show-overflow-tooltip': true
  },
  {
    width: '160',
    prop: 'createdAt',
    label: '提交时间'
  },
  {
    width: '85',
    prop: 'auth1',
    label: '注册证'
  },
  {
    width: '85',
    prop: 'auth2',
    label: '授权书'
  },
  {
    width: '100',
    prop: 'status',
    label: '授权状态',
    formatter: row => {
      if (!row.status && row.status !== 0) {
        return searchParamsC['-1']
      } else {
        return searchParamsC[row.status]
      }
    }
  }
]
